remove #if 0 and #ifdef's

change sprintf(name, "%s", whatever);  to _snprintf(name, sizeof(name), "%s", whatever);

change i++ to ++i